package com.cowin.sys.service.impl;

import com.cowin.inf.model.vo.VehicleRouteVo;
import com.cowin.sys.dao.TmOfmOrderMapper;
import com.cowin.sys.model.TmOfmOrder;
import com.cowin.sys.model.vo.BatachDlivery;
import com.cowin.sys.model.vo.DeliveryCount;
import com.cowin.sys.model.vo.EmosCarInfo;
import com.cowin.sys.model.vo.VehicleImpressVo;
import com.cowin.sys.service.TmOfmOrderService;
import com.cowin.base.AbstractServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Set;


/**
 * Created by  on 2019/11/13.
 *
 * @author CodeGenerator
 */
@Slf4j
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class TmOfmOrderServiceImpl extends AbstractServiceImpl<TmOfmOrder> implements TmOfmOrderService {

    @Resource
    private TmOfmOrderMapper tmOfmOrderMapper;

    @Override
    public VehicleImpressVo getVehicleImpress(String vin) {
        return tmOfmOrderMapper.getVehicleImpress(vin);
    }

    @Override
    public List<VehicleRouteVo> getVehicleImpressList(Map<String,Object> map) {
        return tmOfmOrderMapper.getVehicleImpressList(map);

    }

    @Override
    public EmosCarInfo getEmosCarInfo(String vin) {
        return tmOfmOrderMapper.getEmosCarInfo(vin);
    }

    @Override
    public List<String> lockedUpCount() {
        return tmOfmOrderMapper.lockedUpCount();
    }

    @Override
    public Map<String,DeliveryCount>  getDeliveryCountByBatchNo(Map<String, BatachDlivery> map) {
        return tmOfmOrderMapper.findDeliveryCountByBatchNo(map);
    }
}
